package com.example.barcodeapp.persenter.own;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.ui.wode.bean.JiFenListBean;
import com.example.barcodeapp.ui.wode.bean.UpDateNameBean;
import com.example.barcodeapp.utils.RxUtils;

public class UpdateNamePresenter extends BasePersenter<IOwn.UpDateNameView> implements IOwn.UpDateNamePresenter {
    @Override
    public void getUpDateName(String uid,String name) {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getUpDateName(uid,name)
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<UpDateNameBean>(mView) {
                    @Override
                    public void onNext(UpDateNameBean upDateNameBean) {
                        mView.getUpDateNameBean(upDateNameBean);
                    }
                }));
    }
}
